From: Joey Hess Date: Mon, 29 Sep 2025 15:27:52 +0000 (-0400) Subject: Fix build with ghc 9.0.2. X-Git-Tag: archive/raspbian/10.20251029-1+rpi1~1^2~3^2~47 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=d76e242716a173d9438764b57271b0868b833607;p=git-annex.git Fix build with ghc 9.0.2. --- diff --git a/CHANGELOG b/CHANGELOG index aa63a40a0e..a220b171d2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ git-annex (10.20250926) UNRELEASED; urgency=medium * enableremote: Allow type= to be provided when it does not change the type of the special remote. * importfeed: Fix encoding issues parsing feeds when built with OsPath. + * Fix build with ghc 9.0.2. -- Joey Hess Thu, 25 Sep 2025 13:36:21 -0400 diff --git a/Utility/OpenFd.hs b/Utility/OpenFd.hs index 95f18085a6..62ce4ace91 100644 --- a/Utility/OpenFd.hs +++ b/Utility/OpenFd.hs @@ -14,6 +14,9 @@ module Utility.OpenFd where import System.Posix.IO.ByteString import System.Posix.Types +#if ! MIN_VERSION_unix(2,8,0) +import Control.Monad +#endif import Utility.RawFilePath diff --git a/doc/bugs/Compiling_20250925__44___variable_not_in_scope_error.mdwn b/doc/bugs/Compiling_20250925__44___variable_not_in_scope_error.mdwn index 5ae44072f5..a0a7a2882c 100644 --- a/doc/bugs/Compiling_20250925__44___variable_not_in_scope_error.mdwn +++ b/doc/bugs/Compiling_20250925__44___variable_not_in_scope_error.mdwn @@ -11,3 +11,5 @@ Utility/OpenFd.hs:28:9: error: ``` I'm not sure this error is directly caused by the antiquated compiler, but also not sure how to debug this further or work around it either. + +> [[fixed|done]] --[[Joey]] diff --git a/doc/bugs/Compiling_20250925__44___variable_not_in_scope_error/comment_1_b8ace7d676bdecfd0e3bb47331e48a13._comment b/doc/bugs/Compiling_20250925__44___variable_not_in_scope_error/comment_1_b8ace7d676bdecfd0e3bb47331e48a13._comment new file mode 100644 index 0000000000..1c923b26e1 --- /dev/null +++ b/doc/bugs/Compiling_20250925__44___variable_not_in_scope_error/comment_1_b8ace7d676bdecfd0e3bb47331e48a13._comment @@ -0,0 +1,12 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2025-09-29T15:19:41Z" + content=""" +git-annex is still targeting supporting ghc back to 9.0.2, so your old +ghc should not yet be a problem. However, I don't have any CI left that +uses such old versions of ghc, so it might break from time to time. + +I've fixed this one, which was a missing `import Control.Monad`. Please +report if you find other build failures. +"""]]